package com.d3works.apps.bankpayment.service;

import com.d3works.apps.account.db.InterbankCodeLine;
import com.d3works.apps.account.db.PaymentScheduleLine;
import com.d3works.apps.account.service.PaymentScheduleLineService;
import com.d3works.exception.D3worksException;
import com.d3works.meta.CallMethod;
import java.util.Map;

public interface PaymentScheduleLineBankPaymentService extends PaymentScheduleLineService {
  /**
   * Reject a payment schedule line.
   *
   * @param paymentScheduleLine
   * @param rejectionReason
   * @param represent
   * @throws D3worksException
   */
  void reject(
      PaymentScheduleLine paymentScheduleLine, InterbankCodeLine rejectionReason, boolean represent)
      throws D3worksException;

  /**
   * Reject a payment schedule line.
   *
   * @param name
   * @param rejectionReason
   * @param represent
   * @throws D3worksException
   */
  void reject(String name, InterbankCodeLine rejectionReason, boolean represent)
      throws D3worksException;

  /**
   * Reject payment schedule line from ID.
   *
   * @param id
   * @param rejectionReason
   * @param represent
   * @throws D3worksException
   */
  void reject(long id, InterbankCodeLine rejectionReason, boolean represent)
      throws D3worksException;

  /**
   * Reject payment schedule line from a map of IDs.
   *
   * @param idMap
   * @param represent
   * @return
   */
  int rejectFromIdMap(Map<Long, InterbankCodeLine> idMap, boolean represent);

  /**
   * Reject payment schedule line from a map of names.
   *
   * @param nameMap
   * @param represent
   * @return
   */
  int rejectFromNameMap(Map<String, InterbankCodeLine> nameMap, boolean represent);

  /**
   * Get default rejection reason.
   *
   * @return
   */
  @CallMethod
  InterbankCodeLine getDefaultRejectionReason();
}
